<!DOCTYPE html>
<html>
	<head>
		  <meta charset="UTF-8">
            <#assign base=request.contextPath  />
            <meta name="renderer" content="webkit">
            <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
            <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
            <title></title>
            <link rel="stylesheet" href="../frame/layui/css/layui.css">
            <link rel="stylesheet" href="../frame/static/css/style.css">
            <link rel="icon" href="../frame/static/image/code.png">
            <script type="text/javascript" src="../frame/layui/layui.all.js"></script>
             <script type="text/javascript" src="${base}/js/zhang.js"></script>
             <script type="text/javascript" src="${base}/js/jquery.min.js"></script>
		<style type="text/css">
		form{
		  padding:20px;
		}
		.layui-btn-radius{
        			border-radius: 5px;
        		}
		</style>
	</head>
	<body>
<form class="layui-form" action="">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label" ><a style="color:red">*</a>&nbsp;手机号</label>
            <div class="layui-input-inline">
                <input name="number" id="phone" lay-verify="required" autocomplete="off" class="layui-input isNull" type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label" ><a style="color:red">*</a>&nbsp;添加时间</label>
            <div class="layui-input-inline">
                <input name="number" id="create_time" lay-verify="required" autocomplete="off" class="layui-input isNull" type="text">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label" ><a style="color:red">*</a>&nbsp;企业账户余额</label>
            <div class="layui-input-inline">
                <input name="number" id="surplus_moeny" lay-verify="required|number" autocomplete="off" class="layui-input isNull isNum" type="text">
            </div>
        </div>
         <!--
        <div class="layui-inline">
                    <label class="layui-form-label" ><a style="color:red">*</a>&nbsp;企业冲值累计</label>
                    <div class="layui-input-inline">
                        <input name="number" id="reclipe" lay-verify="required" autocomplete="off" class="layui-input isNull" type="text">
                    </div>
                </div> -->


        <div class="layui-inline">
            <label class="layui-form-label" ><a style="color:red">*</a>&nbsp;可回收资产</label>
            <div class="layui-input-inline">
                <input name="number" id="recovery_moeny" lay-verify="required" autocomplete="off" class="layui-input isNull" type="text">
            </div>
        </div>
         <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn layui-btn-radius" lay-submit lay-filter="formDemo" type="button" onclick="Checksbmint()" style="background-color: #0092EF;">立即提交</button>
                         <button type="reset" class="layui-btn layui-btn-primary layui-btn-radius">重置</button>
        </div>
    </div>

    </div>
</form>

<script>
layui.use(['form','layer'], function(){
  var form = layui.form
  ,layer = layui.layer;

})
  function Checksbmint(){
  var jsonDate={};
      jsonDate.phone= $("#phone").val();
      jsonDate.create_time= $("#create_time").val();
      jsonDate.surplus_moeny= $("#surplus_moeny").val();
      jsonDate.recovery_moeny= $("#recovery_moeny").val();

        if(!isNull()){
        return;
        }
        if(!isNum()){
        return;
        }
      $.ajax({
          type:"POST",
          url:"${base}/ptPeople/addpeople",
          data:{"param":JSON.stringify(jsonDate)},
            success : function(data){
                layer.msg(data);
  setTimeout(function(){
     var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭
  },200)
                                jsonDate.create_time= $("#create_time").val("");
                                jsonDate.phone= $("#phone").val("");
                                jsonDate.surplus_moeny= $("#surplus_moeny").val("");
                                jsonDate.recovery_moeny= $("#recovery_moeny").val("");
                   var table = parent.layui.table;
                      //表刷新方法
                        table.reload('testReload', {
                          url: '${base}/ptPeople/list'
                              ,where: {} //设定异步数据接口的额外参数
                               //,height: 300
                             });
            }
      });
   }


</script>
	</body>
</html>
